<div id="index_context">

</div>
<div id="nav">

</div>
<script>

    route.load("#index_context",{
        //定义根路径
        rootPath: "./components",
        //定义路由列表
        routeList: [
            {page: "home", component: "home.html", default: true},
            {page: "console", component: "console.html"},
            {page: "personal", component: "personal.html"}
        ]
    });
    luban.load("#nav","nav",{
        pos:'bottom',
        selectColor:"#33A3F4",
        data:[
            {
                title:"主页",
                icon:"http://wbb-bk.oss-cn-hangzhou.aliyuncs.com/doc/2020-08-25/d031c944-b3e9-4162-bf15-c9b12ed5ce7a.svg?Expires=1913687667&OSSAccessKeyId=LTAIvXKg61QC9uC9&Signature=NV03UjmLoY6GCOslNSh8fr7frcY%3D",
                selectIcon:"http://wbb-bk.oss-cn-hangzhou.aliyuncs.com/doc/2020-08-25/7eb645de-8e98-47f6-b0fb-bc60ae5e0483.svg?Expires=1913687734&OSSAccessKeyId=LTAIvXKg61QC9uC9&Signature=RlfnOFaYQElycdWyK1u8KIgNSpY%3D",
                hash:"home"
            },
            {
                title:"工作台",
                icon:"http://wbb-bk.oss-cn-hangzhou.aliyuncs.com/doc/2020-08-25/e8676138-795a-4784-9b71-11ba625c0c16.svg?Expires=1913687918&OSSAccessKeyId=LTAIvXKg61QC9uC9&Signature=B87Ikc6Pe9EUMg0BYrdLgLVTlbk%3D",
                selectIcon:"http://wbb-bk.oss-cn-hangzhou.aliyuncs.com/doc/2020-08-25/1f59a0c7-b421-4fc3-8abf-734771dcdf5f.svg?Expires=1913687937&OSSAccessKeyId=LTAIvXKg61QC9uC9&Signature=n2Tfm5f%2BZz7eMI4wi%2BWbAHweupI%3D",
                hash:"console"
            },
            {
                title:"个人中心",
                icon:"http://wbb-bk.oss-cn-hangzhou.aliyuncs.com/doc/2020-08-25/31ca79ab-3acd-438f-80f1-714c50ef9976.svg?Expires=1913688048&OSSAccessKeyId=LTAIvXKg61QC9uC9&Signature=TyKT0tys8FRLtHZlts0PL86MUoI%3D",
                selectIcon:"http://wbb-bk.oss-cn-hangzhou.aliyuncs.com/doc/2020-08-25/58966ccf-d2bf-4bf9-a2c2-d9369819c538.svg?Expires=1913688072&OSSAccessKeyId=LTAIvXKg61QC9uC9&Signature=ZOYKNQyTn9qN0EvtqPF4JnZb18k%3D",
                hash:"personal"
            },

        ],
        onClick:onClickNav
    });
    function onClickNav(index,record) {
        let path = "#/"+record.hash;
        window.location.replace(path)
    }


</script>
